package helper

import (
	"strings"
)

func IsProduction(appEnv string) bool {
	arr := []string{"prod", "main", "master", "pro"}
	var isPro bool
	for _, item := range arr {
		if strings.ToLower(item) == strings.ToLower(appEnv) {
			isPro = true
			break
		}
	}
	return isPro
}

func IsDev(appEnv string) bool {
	arr := []string{"test", "dev", "develop"}
	var isDev bool
	for _, item := range arr {
		if strings.ToLower(item) == strings.ToLower(appEnv) {
			isDev = true
			break
		}
	}
	return isDev
}

func IsLocal(appEnv string) bool {
	arr := []string{"local", "localhost", "islocalhost"}
	var isLocal bool
	for _, item := range arr {
		if strings.ToLower(item) == strings.ToLower(appEnv) {
			isLocal = true
			break
		}
	}
	return isLocal
}

func IsRelease(appEnv string) bool {
	arr := []string{"pre", "release"}
	var isRelease bool
	for _, item := range arr {
		if strings.ToLower(item) == strings.ToLower(appEnv) {
			isRelease = true
			break
		}
	}
	return isRelease
}
